<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多彩主题背景切换</title>
    <style>
        * {
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }

        body {
            background-size: cover;
            font-family: 'Helvetica Neue', Arial, sans-serif;
            transition: background 1s ease;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            position: relative;
        }

        body::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(5px);
            z-index: -1;
        }

        .header {
            text-align: center;
            margin-bottom: 30px;
            color: #2c3e50;
            text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
        }

        .header h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
            font-weight: 300;
        }

        .header p {
            font-size: 1.1rem;
            opacity: 0.9;
        }

        .nav {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            width: 90%;
            max-width: 800px;
            height: 220px;
            padding: 20px;
            background-color: rgba(255, 255, 255, 0.8);
            border-radius: 15px;
            box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
            backdrop-filter: blur(4px);
            border: 1px solid rgba(255, 255, 255, 0.5);
        }

        .image-container {
            position: relative;
            border-radius: 10px;
            overflow: hidden;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .nav img {
            width: 150px;
            height: 180px;
            object-fit: cover;
            display: block;
            transition: all 0.3s ease;
        }

        .image-container:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
        }

        .image-container:hover img {
            transform: scale(1.05);
        }

        .image-name {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.9);
            padding: 8px;
            text-align: center;
            font-size: 0.9rem;
            color: #2c3e50;
            transform: translateY(100%);
            transition: transform 0.3s ease;
        }

        .image-container:hover .image-name {
            transform: translateY(0);
        }

        .footer {
            margin-top: 30px;
            text-align: center;
            color: #2c3e50;
            font-size: 0.9rem;
            opacity: 0.8;
        }
    </style>
</head>

<body>
    <div class="header">
        <h1>多彩主题背景切换</h1>
    </div>

    <div class="nav">
        <div class="image-container">
            <img src="https://img95.699pic.com/photo/60073/4195.jpg_wh860.jpg?auto=format&fit=crop&w=400&h=500&q=80" alt="山脉">
            <div class="image-name">苹果</div>
        </div>
        <div class="image-container">
            <img src="https://ylyy.whit.edu.cn/__local/8/6D/B1/39439F82D14F5DF94341C78A9AE_AB4BDC37_23BA7.jpg?e=.jpg?auto=format&fit=crop&w=400&h=500&q=80" alt="森林">
            <div class="image-name">桃子</div>
        </div>
        <div class="image-container">
            <img src="https://img.huabaike.com/tukuimgs/775/20200923112019_246486.jpg?auto=format&fit=crop&w=400&h=500&q=80" alt="海滩">
            <div class="image-name">芭乐</div>
        </div>
        <div class="image-container">
            <img src="https://img95.699pic.com/photo/32053/0961.jpg_wh300.jpg?auto=format&fit=crop&w=400&h=500&q=80" alt="湖泊">
            <div class="image-name">葡萄</div>
        </div>
    </div>



    <script>
        var images = document.querySelector('.nav').querySelectorAll('img');
        for (var i = 0; i < images.length; i++) {
            images[i].onclick = function() {
                document.body.style.backgroundImage = 'url(' + this.src + ')';
                
                // 添加背景切换动画效果
                document.body.style.opacity = 0;
                setTimeout(function() {
                    document.body.style.opacity = 1;
                }, 100);
            }
        }
    </script>
</body>
</html>